<html>
    <head>

    </head>
    <body>
        <div id="div1">你好</div>
        <input type="button" value="隐藏" id="button1" onclick="hiddenDiv()"> 
    <input type="button" value="显示" id="button2"    onclick="showDiv()">
    </body>

    <script>
          document.getElementById("div1");
        function hiddenDiv(){
            div1.style.display ="none";
        }
        function showDiv(){
            div1.style.display ="block";
        }
    </script>
</html>